@extends('layouts.mobile_main')

@section('title', '今日')

@section('resources')
    @parent
    <link rel="stylesheet" href="{{ env('CSS_DOMAIN') }}/css/public.css?v={{env('CSS_VERSION')}}">
    <style>
        input{width: 3rem;height: 1rem;background: #9955c6;border-radius: 0.1rem;}
    </style>
@endsection

@section('content')
    <input type="button" name="" value="打开克拉攝影" onclick="openShopDetail('1')">
    <input type="button" name="" value="分享" onclick="share('www.baidu.com')">
    <input type="button" name="" value="充值" onclick="charge()">
    <input type="button" name="" value="打电话" onclick="callTel('18270880389')">
    <input type="button" name="" value="获取定位" onclick="getLatlng()">
    <input type="button" name="" value="获取token" onclick="getToken()">
    <input type="button" name="" value="刷新用户信息" onclick="refreshUserInfo()">
    <input type="button" name="" value="领取红包" onclick="get()">
@endsection

@section("scriptResources")
  @parent
  <script src="{{ env('JS_DOMAIN') }}/js/banner.js?v={{env('JS_VERSION')}}"></script>
  <script src="{{ env('JS_DOMAIN') }}/js/adaptation.js?v={{env('JS_VERSION')}}"></script>
  <script src="{{ env('JS_DOMAIN') }}/js/include.js?v={{env('JS_VERSION')}}"></script>
  <script>
    //获取定位，返回经纬度
      function getLatlng(){
        var latlng=MobileJS.getLatlng();
        alert(latlng);
      }
    //充值
      function charge(){
        MobileJS.charge();
      }
    //打电话
      function callTel(telNum){
        MobileJS.callTel(telNum);
        // console.log()
      }
    //打开商家详情
      function openShopDetail(shopid){
        MobileJS.openShopDetail(shopid);
        // console.log()
      }
    //分享
      function share(url){
        MobileJS.share(url);
        // console.log()
      }
    //获取token
      function getToken(){
        var token=MobileJS.getToken();
        alert(token)
        // console.log()
      }
    //刷新用户信息
      function refreshUserInfo(){
        MobileJS.refreshUserInfo();
        // console.log()
      }
    //弹窗
      function showDialog(msg){
        MobileJS.showDialog(msg);
        // console.log()
      }
    //领取红包
      function get(){
        MobileJS.getRedBag()
      }
  </script>
@endsection